<form class="form-horizontal" id="roleDetailForm">
    <input class="hidden" name="roleId" th:value="${role.roleId}">
    <div class="box-body">
        <div class="form-group">
            <label class="col-sm-3 control-label">角色名称 :</label>
            <div class="col-sm-8">
                <input type="text" th:value="${role.roleName}" class="form-control" name="roleName" require="必填项"  placeholder="">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">角色描述 :</label>
            <div class="col-sm-8">
                <input type="text" th:value="${role.remark}" class="form-control" name="remark" placeholder="">
            </div>
        </div>

    </div>
    <!-- /.box-body -->
    <div class="box-footer">
        <div class="pull-right">
            <button type="button" id="saveDetailRole" class="btn btn-info">确定</button>
            <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
        </div>
    </div>
    <!-- /.box-footer -->
</form>
<script>
    $(function () {
        $("#saveDetailRole").on('click', function () {
            if(doValidForm(roleDetailForm)){
                Core.mask("#saveDetailRole")
                Core.postAjax(ctxPath + "/role/edit",$("#roleDetailForm").serialize(),function (data) {
                    Core.unmask("#saveDetailRole");
                    if(data.code==200){
                        $("#roleDetailModal").modal("hide");
                        Core.refreshJqTable("#table_list",true);
                    }
                    layer.msg(data.msg);
                })
            }
        })
    });
</script>